From: Andrew Cooper Date: Thu, 15 Jan 2015 16:56:25 +0000 (+0100) Subject: x86/viridian: do not leak page refs and mappings if the host tsc is unstable X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3918 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8fabafd6ded8ed81eef4eb53947be13e0aa97a68;p=xen.git x86/viridian: do not leak page refs and mappings if the host tsc is unstable Signed-off-by: Andrew Cooper Coverity-ID: 1264360 Reviewed-by: Paul Durrant --- diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c index cb689f6a2b..1e5a570261 100644 --- a/xen/arch/x86/hvm/viridian.c +++ b/xen/arch/x86/hvm/viridian.c @@ -287,7 +287,7 @@ static void update_reference_tsc(struct domain *d, bool_t initialize) printk(XENLOG_G_INFO "d%d: VIRIDIAN REFERENCE_TSC: invalidated\n", d->domain_id); - return; + goto out; } /* @@ -306,6 +306,7 @@ static void update_reference_tsc(struct domain *d, bool_t initialize) p->TscSequence == 0 ) /* Avoid both 'invalid' values */ p->TscSequence = 1; + out: unmap_domain_page(p); put_page_and_type(page);